package com.zhudi.model;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import lombok.Data;

import java.io.Serializable;

@Data
/**
 * 各种接口类的父类，主要作用是承载参数，用于参数传递
 */
public class AbstractModel implements Serializable {
    //标识接口的前缀路径
    private String path="/";
    private String method="POST";
    public static String toJsonString(AbstractModel abstractModel){
        Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
        return gson.toJson(abstractModel);
    }
}
